#pragma once

#ifndef DRAG_H
#define DRAG_H

#include "ForceGenerator.h"

/**
 * A force generator that applies a drag force. One instance
 * can be used for multiple particles.
 */
class Drag : public ForceGenerator
{
private:
	/** Holds the velocity drag coefficient. */
	float k1;
	/** Holds the velocity squared drag coefficient. */
	float k2;
public:
	/** Creates the generator with the given coefficients*/
	Drag(float k1, float k2) : k1(k1), k2(k2) { }
	virtual ~Drag() { }
	/** Applies the drag force to the given particle. */
	virtual void updateForce(Particle* particle, float frameTime);
};

#endif